{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import yaml\n",
    "import os\n",
    "\n",
    "import plotly\n",
    "import plotly.express as px\n",
    "import plotly.graph_objects as go\n",
    "\n",
    "import glog as log\n",
    "\n",
    "import evaluation.tools as evt\n",
    "from evaluation.evaluation_lib import aggregate_all_results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Parse experiment yaml file\n",
    "experiments_path=\"../experiments/full_euroc.yaml\"\n",
    "\n",
    "# Get experiment information from yaml file.\n",
    "experiment_params = yaml.load(open(experiments_path))\n",
    "\n",
    "# Get directory where all results are stored\n",
    "results_dir = os.path.expandvars(experiment_params['results_dir'])\n",
    "\n",
    "# Collect results\n",
    "stats = aggregate_all_results(results_dir)\n",
    "#evt.check_stats(stats)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "figure = evt.draw_ape_boxplots_plotly(stats, False)\n",
    "figure.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
